package darkwindclient.connection;

import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;

/**
 * @author Jacob Ferm
 */
public class Writer{
	
	private PrintWriter pw;

	public Writer(OutputStream outputStream) {
		pw = new PrintWriter(new OutputStreamWriter(outputStream));
	}


	/**
	 * Writes a string to the outputstream
	 * @param text the string to be written
	 */
	public void write(String text) {
		pw.write(text + "\r\n");
		pw.flush();
	}
}
